((typeof self !== 'undefined' ? self : this)["webpackJsonppage_engine"] = (typeof self !== 'undefined' ? self : this)["webpackJsonppage_engine"] || []).push([[7],{

/***/ "0992":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "681b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_index_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_stylus_loader_index_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_template_create_vue_vue_type_style_index_0_id_210d9d31_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0992");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_index_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_stylus_loader_index_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_template_create_vue_vue_type_style_index_0_id_210d9d31_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_index_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_stylus_loader_index_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_template_create_vue_vue_type_style_index_0_id_210d9d31_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "bae5":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "eb7f":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3712dab3-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./client/pages/home/template-create.vue?vue&type=template&id=210d9d31&scoped=true&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"page template-create"},[_c('div',{staticClass:"project-list-header"},[_c('div',{staticClass:"project-list-cancel",on:{"click":_vm.onGoback}},[_c('i',{staticClass:"el-icon-arrow-left"}),_vm._v("返 回")])]),_c('div',{staticClass:"project-list_body"},[_c('el-container',[_c('el-aside',{attrs:{"width":"300px"}},[_c('div',{staticClass:"templateArea"},[_c('div',_vm._l((_vm.templateList),function(template,index){return _c('div',{key:index,staticClass:"project-list_item",class:{ 'project-list_active': index === _vm.templateIndex },on:{"click":function($event){return _vm.onPreview(template, index)}}},[_c('div',{staticClass:"project_list_item_proimg_wrap"},[_c('img',{staticClass:"project_list_item_proimg",attrs:{"src":template.thumbnailImage}})]),_c('div',{staticClass:"project_list_item_name_wrap"},[_c('div',{staticClass:"project_list_item_left"},[_vm._v(_vm._s(template.title)+"模板")]),_c('div',{staticClass:"project_list_item_right"},[_c('div',[_vm._v("\n\t\t\t\t\t\t\t\t\t\t"+_vm._s(((template.screenWidth) + "x" + (template.screenHeight) + "px"))+"\n\t\t\t\t\t\t\t\t\t")])])])])}),0)])]),_c('el-main',[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.iframeTitle),expression:"iframeTitle"}],staticClass:"iframeTitle"},[_c('div',[_vm._v("\n\t\t\t\t\t\t"+_vm._s(_vm.iframeTitle)+" "),_c('span',[_vm._v("（分辨率"+_vm._s(_vm.iframeWidth)+"*"+_vm._s(_vm.iframeHeight)+"）")])]),_c('div',[_c('el-button',{attrs:{"type":"primary","round":"","size":"small"},on:{"click":_vm.submitCreate}},[_vm._v("确认创建")])],1)]),(_vm.iframeSrc)?_c('iframe',{attrs:{"src":_vm.iframeSrc,"frameborder":"0","width":"100%","height":"100%"}}):_c('div',{staticClass:"newTemplete"})])],1)],1)])}
var staticRenderFns = []


// CONCATENATED MODULE: ./client/pages/home/template-create.vue?vue&type=template&id=210d9d31&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./client/pages/home/template-create.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var template_createvue_type_script_lang_js_ = ({
  data: function data() {
    return {
      templateList: [],
      iframeSrc: '',
      iframeTitle: '通用大屏',
      iframeWidth: '1920',
      iframeHeight: '1080',
      templateIndex: 0,
      templateId: ''
    };
  },
  mounted: function mounted() {
    this.getTemplateList();
  },
  methods: {
    getTemplateList: function getTemplateList() {
      var _this = this;

      this.$axios.get('/project/myTemplate').then(function (res) {
        if (res.code === 200) {
          var data = res.body;
          data.unshift({
            title: '通用大屏',
            screenWidth: '1920',
            screenHeight: '1080'
          });
          _this.templateList = data;
        }
      });
    },
    onGoback: function onGoback() {
      this.$router.history.go(-1);
    },
    onNewProject: function onNewProject() {
      this.$router.push({
        name: 'PowerEditor'
      });
    },
    submitCreate: function submitCreate() {
      if (!this.iframeSrc) {
        this.onNewProject();
      } else {
        this.onTemplateCreate(this.templateId);
      }
    },
    onTemplateCreate: function onTemplateCreate(_id) {
      var _this2 = this;

      // console.log(e.currentTarget.dataset)
      // let _id = e.currentTarget.dataset.id
      //先复制项目再跳转
      this.$axios.post('/project/copy/' + _id).then(function (res) {
        if (res.code === 200) {
          var project = res.body;

          _this2.$router.push({
            name: 'PowerEditor',
            params: {
              id: project._id
            }
          });
        }
      });
    },
    onPreview: function onPreview(template, index) {
      this.templateIndex = index; // let _id = e.currentTarget.dataset.id
      // window.open(`${this.$config.serverURl}/project/view/${_id}`, '_blank')

      this.iframeTitle = template.title || '通用大屏';
      this.iframeWidth = template.screenWidth || '1920';
      this.iframeHeight = template.screenHeight || '1080';
      this.iframeSrc = '';
      this.templateId = '';

      if (template._id) {
        this.templateId = template._id;
        this.iframeSrc = "".concat(this.$config.serverURl, "/project/view/").concat(template._id);
      }
    }
  }
});
// CONCATENATED MODULE: ./client/pages/home/template-create.vue?vue&type=script&lang=js&
 /* harmony default export */ var home_template_createvue_type_script_lang_js_ = (template_createvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./client/pages/home/template-create.vue?vue&type=style&index=0&id=210d9d31&lang=stylus&scoped=true&
var template_createvue_type_style_index_0_id_210d9d31_lang_stylus_scoped_true_ = __webpack_require__("681b");

// EXTERNAL MODULE: ./client/pages/home/template-create.vue?vue&type=style&index=1&lang=stylus&
var template_createvue_type_style_index_1_lang_stylus_ = __webpack_require__("f509");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./client/pages/home/template-create.vue







/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  home_template_createvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  "210d9d31",
  null
  
)

/* harmony default export */ var template_create = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "f509":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_index_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_stylus_loader_index_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_template_create_vue_vue_type_style_index_1_lang_stylus___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bae5");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_index_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_stylus_loader_index_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_template_create_vue_vue_type_style_index_1_lang_stylus___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_index_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_stylus_loader_index_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_template_create_vue_vue_type_style_index_1_lang_stylus___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ })

}]);